<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MAIL->AddHeader()</title>
<style>
body, pre {
	font-family: Verdana;
	font-size: 10pt;
}
a {	color: blue; text-decoration: none }
a:hover { text-decoration: underline }
</style>
</head>
<body bgcolor="#f1f3f5" topmargin="10" leftmargin="14">

<pre>
<hr color="white">
MAIL -> <i>boolean</i> <b>addheader</b> ( <i>string</i> name, <i>string</i> value [, <i>string</i> charset [, <i>string</i> encoding ]] )
<hr>
Return TRUE if has been successfully added, FALSE if not.

Default values are:
<i>string</i> charset: utf-8
<i>string</i> encoding: quoted-printable

<i>string</i> encoding possible values are: quoted-printable or base64

The most important values of header (see the list) can not be set.
This values are automatically build or you can use a function to set it.

List of headers name that can NOT be set using this function:
 Subject, From, To, Cc, Bcc, Date, Content-Type, 
 Content-Transfer-Encoding, Content-Disposition, Message-ID, 
 X-Mailer, X-Priority, X-MSMail-Priority, X-MimeOLE, MIME-Version

<i>Notice</i>: you can add multiple header values with the same name.

Example (verification):
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
$m = new MAIL;

// add "X-Whatever" mail header value
$h = $m->AddHeader('X-Whatever', 'the value');

echo $h ? 'added' : 'error';
</code></pre>
</td></tr>
</table>

Example (deprecated):
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
$m = new MAIL;

// add "X-Whatever" mail header value, charset and encoding
$m->Header[] = array(
'name'     => 'X-Whatever', // required
'value'    => 'the value', // required
'charset'  => 'utf-8', // optional
'encoding' => 'base64' // optional
);
// add another "X-Whatever" mail header value
$m->Header[] = array('name' => 'X-Whatever', 'value' => 'the second value');
</code></pre>
</td></tr>
</table>

<hr color="white">

See Also: <a href="delheader.html">MAIL->DelHeader()</a>

[ <a href="mail&#116;&#111;:contact&#064;xpertmailer.com?subject=Comment MAIL AddHeader">Comments</a> ]

Last update: Tuesday, October 23, 2007

<hr>
</pre>

</body>
</html>